package pack3;

public class test10 {
    public static void main(String[] args) {
        double[] x = {60, 63.5, 68, 69.5, 70.2, 76, 83.5, 88.2, 95.2, 102.2};
        double[] y = {58.5, 70.7, 78.3, 69.5, 75.2, 88.5, 90, 92.5, 96.0, 103.5};

        LinearRegression linearRegression = new LinearRegression();
        linearRegression.inputFeature(x);
        linearRegression.inputLabel(y);

        linearRegression.fit();

        double predictedPrice = linearRegression.predict(72.5);
        System.out.println("房屋面积为72.5时，预测价格为: " + predictedPrice);
    }
}
